package org.sys.transporttrainsys.repository;

import org.sys.transporttrainsys.entity.Organization;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrganizationRepository extends JpaRepository<Organization, Long> {
    // 根据机构名称查询
    List<Organization> findByName(String name);

    // 根据机构类型查询
    List<Organization> findByType(String type);

    // 根据机构名称和类型联合查询
    List<Organization> findByNameAndType(String name, String type);
}